package com.zjcode.cdcer.mapper;

import com.chinatechstar.component.commons.supports.PageData;
import com.zjcode.cdcer.model.CerDetaildataImportInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;

@Mapper
public interface CerDetaildataImportInfoMapper {

    List<LinkedHashMap<String, Object>> listAllTableData(@Param("pageData") PageData pageData);

    List<LinkedHashMap<String, Object>> queryAllExportData(@Param("pageData") PageData pageData);

    void batchDeletion(@Param("pageData") PageData pageData);

    void oneClickDelete(@Param("pageData") PageData pageData);

    List<CerDetaildataImportInfo> getAllNoErrorData(@Param("pageData") PageData pageData);

    void updateCerDetaildataImportInfoStatus(@Param("pageData") PageData pageData);

    int deleteById(@Param("id") String id);

    CerDetaildataImportInfo findDataById(@Param("id") String id);

    int updateExtFlagByCreateBy(@Param("updatedExtFlag") String updatedExtFlag,
                                @Param("createBy") String createBy);

    int insertList(@Param("list") List<CerDetaildataImportInfo> list);


    int updateRecord(CerDetaildataImportInfo detaildataImportInfo);

    List<CerDetaildataImportInfo> selectAllByInsertDatetimeBetweenOrEqualTo(@Param("minInsertDatetime") String minInsertDatetime,
                                                                            @Param("maxInsertDatetime") String maxInsertDatetime);


    List<CerDetaildataImportInfo> selectByNjNum(@Param("njNum") String njNum,
                                                @Param("extFlag") String extFlag);

    List<CerDetaildataImportInfo> selectByBlNum(@Param("blNum") String blNum,
                                                @Param("extFlag") String extFlag);

    List<CerDetaildataImportInfo> selectByNameAndNjzlTime(@Param("name") String name,
                                                          @Param("njzlTime") String njzlTime,
                                                          @Param("extFlag") String extFlag);

    List<CerDetaildataImportInfo> selectByNameAndBlbgTime(@Param("name") String name,
                                                          @Param("blbgTime") String blbgTime,
                                                          @Param("extFlag") String extFlag);


    List<CerDetaildataImportInfo> queryAllData();

    int countDetailData(Date time);

    int countDetailDataT2(Date time, String cityid);

    List<LinkedHashMap<String, Object>> selectDetailForGJMode(@Param("idList") List<String> idList,
                                                              @Param("idsData") Object idsData,
                                                              @Param("pageData") PageData pageData);

}
